	PROGRAM COSX
C
C Program to plot a three dimensional COS(X)/X function with
C hidden-lines removed
C
	COMMON ANGA, ANGB, HV, D
	COMMON DL, DM, DN, CX, CY, CZ, QX, QY, QZ, DD
C
	REAL X1, Y1, DX, DY, DELMIN
	DATA X1, Y1, DX, DY /-16.0, -16.0, 0.5, 0.5/
	INTEGER NX, NY
	DATA NX, NY /65, 65/
	REAL ADEG, BDEG
	DATA ADEG, BDEG /60.0, 30.0/
C
	REAL A(100, 100)
C
	DELMIN = DX
	IF(DELMIN.GT.DY) DELMIN = DY
	WRITE(6,50)
50	FORMAT(1X,'Generating Cos(X)/X function values',/)
	X = X1
	DO 129 I = 1, NX
	    Y = Y1
	    DO 119 J = 1, NY
		XSQR = SQRT(X * X + Y * Y)
		IF(XSQR.LT.0.001) XSQR = 0.9 * DELMIN 
		A(I,J) = COS(XSQR)/XSQR
		Y = Y + DY
119	    CONTINUE
	    X = X + DX
129	CONTINUE
C
1	WRITE(6,100)
100	FORMAT(1X,'INPUT TILT AND ROTATION ANGLES ')
	READ(5,*)BDEG,ADEG
C200	FORMAT(2F10.2)
	IF(BDEG.LE.90.0) GOTO 118
	WRITE(6,101)CHAR(27)
101	FORMAT(1X,A1,'mA')
	STOP
C
118	PI = 3.141593
	ANGA = ADEG * PI / 180.0
	ANGB = BDEG * PI / 180.0
	HV = 5.0
	CALL THREED(A, NY, NY, 3)
	CALL	PICSIZ(0.,0.)
	GOTO 1
C
	END
